using System;
using System.Xml.Serialization;

namespace Jaws.Core.Web.Entities.Profiles
{
    /// <summary>
    /// 
    /// </summary>
    [Serializable]
    public class ProfileProperty
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ProfileProperty"/> class.
        /// </summary>
        public ProfileProperty()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ProfileProperty"/> class.
        /// </summary>
        /// <param name="key">The key.</param>
        public ProfileProperty(string key)
        {
            Key = key;
        }

        /// <summary>
        /// Gets or sets the key.
        /// </summary>
        /// <value>The key.</value>
        [XmlAttribute("name")]
        public string Key { get; set; }

        /// <summary>
        /// Gets or sets the value.
        /// </summary>
        /// <value>The value.</value>
        [XmlElement(DataType = "base64Binary", Type = typeof (byte[]), ElementName = "binaryValue")]
        [XmlElement(typeof (string), ElementName = "value")]
        public object Value { get; set; }
    }
}